# Recipe file for jimtcl.
#
# Maintainers: (C) 2016 Mateus P. Rodrigues, mprodrigues@dragora.org.
#
# Under the terms of the GNU General Public License.

program=jimtcl
version=20160909
release=1

description="
Jim is an opensource small-footprint implementation of the Tcl
programming language. It implements a large subset of Tcl and adds new
features like references with garbage collection, closures, built-in
Object Oriented Programming system, Functional Programming commands,
first-class arrays and UTF-8 support. All this with a binary size of
about 100-200kB (depending upon selected options).

The Jim core is very stable. Jim passes over 3000 unit tests and many
Tcl programs run unmodified. Jim is highly modular with the possiblity
to configure many components as loadable modules, or omitted
entirely. A number of extensions are included with Jim which may be
built as loadable modules.

Jim cross compiles easily and is in use in many embedded
environments. It runs under many operating systems, including Linux,
FreeBSD, QNX, eCos, Windows (cygwin and mingw32).

Jim has built-in command line editing for the interactive shell,
jimsh.
"

homepage=http://jim.tcl.tk
license=BSD

tarname=${program}-${version}.tar.lz

# Remote source(s)
fetch=""

# Parallel jobs for the compiler
jobs=1

# Source documentation
docs="AUTHORS BUGS DEVELOPING LICENSE README* STYLE TODO"

build() {
    unpack "${tardir}/$tarname"

    cd "$srcdir"
    ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS"

    make -j${jobs}
    make -j${jobs} install DESTDIR="$destdir"

    # Copy documentation
    mkdir -p "${destdir}/usr/share/doc/${program}-${version}"
    cp -p $docs "${destdir}/usr/share/doc/${program}-${version}/"
}
